package com.example.springboot_es.data;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

@Data
@Document(indexName = "monitoralarm") //加上了@Document注解之后，默认情况下这个实体中所有的属性都会被建立索引、并且分词
public class MonitorAlarmVO implements Serializable {

    @Id
    private String id;
    private String uniqueKey;
    private Long monitoryPointId;
    private int modelDivisionType;
    private Long groupId;

    @Field(analyzer = "ik_smart", type = FieldType.Text)
    private int type;
    private int status;
    private String serverHost;
    private String data;
    private int picWidth;
    private int picHeight;
    private String objects;
    private Date alarmTime;
    private Date createTime;
    private boolean isRemove;
    private Date removeTime;
}